<template>
  <view>
    <view>管理员登录</view>
    <form @submit="adminLoginSubmit">
      <view class="input-info">
        <view class="inline-text">管理员</view>
        <input class="inline-text" type="text" name="adminName" />
        <view class="inline-text">密码</view>
        <input class="inline-text" type="password" name="password" />
      </view>
      <button form-type="submit" type="primary">登录</button>
    </form>
  </view>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    adminLoginSubmit: function (ev) {
      let adminName = ev.detail.value.adminName,
        password = ev.detail.value.password;
        uni.navigateTo({
            url: "/pages/admin/adminPage",
            success: (res) => {console.log(res)},
            fail: (err) => {console.log(err)}
        });
    },
  },
};
</script>

<style>
.input-info {
  margin: auto;
  width: 80%;
  display: grid;
  grid-template-rows: 50% 50%;
  grid-template-columns: auto auto;
}
.inline-text {
  font-size: 0.8em;
  padding: 5px;
  margin: 5px;
}
uni-input {
  border: grey 1px solid;
  font-size: 1em;
  border-radius: 5px;
}
</style>